<div style="text-align:right;margin:10px;">
<a class="menu_action" href="<?php echo url_for('lexique/new'); ?>"><?php echo image_tag("Icons/menu_action/new.png", array("width" => 13,"height" => 13, "alt" => "icon")) ?> Proposer un nouveau mot</a>
</div>
<div style="text-align:right">
<form action="<?php echo url_for("search/lexique") ?>" method="post">
	<label class="label_lexique">Rechercher un mot dans le lexique</label>
	<input type="text" name="words"/>
    <input name="search" type="submit" value="Rechercher">                                   
 </form>
</div>    
<div class="title_section">
	Lexique informatique
</div>
<div class="section">
	

    <div align="center">
   	<?php for($i = 0; $i < strlen($letters);$i++):?>
      <a href="<?php echo url_for("lexique/index?letter=".$letters[$i]) ?>"  class="link_title"><?php echo $letters[$i]?></a>
    <?php endfor;?>
    </div>
    <div class="nav_barre"><?php echo get_component('headers', 'pager', array('module' => "lexique", 'action' => "index","params" => $params, 'pager' => $pager,"optNbTotal" => false,"optImgNextPrev" => false)); ?></div>
    
    <?php foreach($lexiquesMot as $lexique):?>
        <ul class="elem_on_section">
            <li class="inline lexique_word" style="width: 607px">
               <?php echo $lexique["mot"] ?>
            </li>
            <li class="inline author">
            	(par <a href="<?php echo url_for("compte/show?id=".$lexique["SfGuardUserProfile"]["id"]) ?>" class="no_underline"><?php echo $lexique["SfGuardUserProfile"]["User"]["username"]?></a>)
               	
            </li>
            
            <?php 
			$i = 0;
			foreach($lexique["Lexiquedefinition"] as $definition):?>
               
                <li>
                   <?php echo $definition["definition"]?>
                   	<span class="author block" style="text-align:right">
                    	(par <a href="<?php echo url_for("compte/show?id=".$definition["SfGuardUserProfile"]["id"]) ?>" class="no_underline"><?php echo $definition["SfGuardUserProfile"]["User"]["username"]?></a>)
                    </span>
                    <span class="block" style="text-align:right; margin:10px;">
                        <a class="menu_action" href="<?php echo url_for('definition/new?id='.$lexique["idlexique_mot"]); ?>"><?php echo image_tag("Icons/menu_action/new.png", array("width" => 13,"height" => 13, "alt" => "icon")) ?>  Proposer votre définition</a>
                     
                    	<a class="menu_action" href="<?php echo url_for("lexique/vote?type=plus&id=".$definition["idlexique_definition"]) ?>"><?php echo image_tag("Icons/menu_action/voteplus.png", array("width" => 13,"height" => 13, "alt" => "pict")) ?> Bonne définition!</a>
                    	<a class="menu_action" href="<?php echo url_for("lexique/vote?type=moins&id=".$definition["idlexique_definition"]) ?>"><?php echo image_tag("Icons/menu_action/votemoins.png", array("width" => 13,"height" => 13, "alt" => "pict")) ?> Mauvaise définition!</a>
                  
                    (<?php echo $definition["vote"] ?>)
                    
                    </span>
                </li>	
                
                <?php if($i == 0):?>
                	<div class='hidden' id="hides_defs_<?php echo $lexique["idlexique_mot"] ?>">
				<?php endif;?>
                <?php if($i == count($lexique["Lexiquedefinition"]) - 1):?>
                	</div>
				<?php endif;?>     
            <?php $i++;endforeach;?> 
            
				<?php if($i > 1):?>
                      <li  style="text-align:right; margin:10px;" id="show_more_def_<?php echo $lexique["idlexique_mot"] ?>">
                            <a class="menu_action" href="#show_more_def_<?php echo $lexique["idlexique_mot"] ?>" onclick="display_elem('hides_defs_<?php echo $lexique["idlexique_mot"] ?>');show_link('show_less_defs_<?php echo $lexique["idlexique_mot"] ?>','show_more_def_<?php echo $lexique["idlexique_mot"] ?>')"><?php echo image_tag("Icons/menu_action/information.png", array("width" => 13,"height" => 13, "alt" => "icon")) ?> Voir plus de définition</a>  
                     </li>
                     <li class='hidden'  style="text-align:right; margin:10px;" id="show_less_defs_<?php echo $lexique["idlexique_mot"] ?>">
                            <a class="menu_action" href="#show_more_def_<?php echo $lexique["idlexique_mot"] ?>" onclick="display_elem('hides_defs_<?php echo $lexique["idlexique_mot"] ?>');show_link('show_less_defs_<?php echo $lexique["idlexique_mot"] ?>','show_more_def_<?php echo $lexique["idlexique_mot"] ?>')"><?php echo image_tag("Icons/menu_action/information.png", array("width" => 13,"height" => 13, "alt" => "icon")) ?> Voir moins de définition</a>  
                     </li>
                 <?php endif;?> 
        </ul>
    <?php endforeach;?>

<div class="nav_barre"><?php echo get_component('headers', 'pager', array('module' => "lexique", 'action' => "index","params" => $params, 'pager' => $pager)); ?></div>
    <div align="center">
    <?php for($i = 0; $i < strlen($letters);$i++):?>
      <a href="<?php echo url_for("lexique/index?letter=".$letters[$i]) ?>"  class="link_title"><?php echo $letters[$i]?></a>
    <?php endfor;?>
    </div>
</div>
<!-- ENDIF -->
